package vesion2.tool;

import java.awt.*;
import java.util.ArrayList;

public class LoadImages {
    private static ArrayList<Image> images=null;

    public static ArrayList<Image> getBombImages(){
        if(images==null) {
            images = new ArrayList<>();
            Image image = Toolkit.getDefaultToolkit().getImage(LoadImages.class.getResource("/po1.png"));
            Image image1 = Toolkit.getDefaultToolkit().getImage(LoadImages.class.getClass().getResource("/po2.png"));
            Image image2 = Toolkit.getDefaultToolkit().getImage(LoadImages.class.getClass().getResource("/po3.png"));
            images.add(image);
            images.add(image1);
            images.add(image2);
        }
        return images;
    }

    public static Image getImageInPath(String src){
        return Toolkit.getDefaultToolkit().getImage(LoadImages.class.getResource(src));
    }
}
